chrome.action.onClicked.addListener(async (tab) => {
  try {
    await chrome.scripting.executeScript({
      target: {tabId: tab.id},
      files: ['content.js']
    });
  } catch (error) {
    console.error('Failed to inject content script:', error);
  }
});